<?php
/**
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width">
    <meta name="keywords" content="心元資本, 心元, 資本, CherubicVentures ,VC, CV, Cherubic Ventures" >
    <meta name="description" content="<?php bloginfo('description'); ?>" />
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

    <link rel="icon" type="image/icon" href="<?php bloginfo('template_directory'); ?>/img/favicon.ico"/>
    <link rel="icon" type="image/png" href="<?php bloginfo('template_directory'); ?>/img/favicon.png"/>
    <link rel="icon" type="image/gif" href="<?php bloginfo('template_directory'); ?>/img/favicon.gif"/>
    <link rel="stylesheet" href="<?php asset('core/bootstrap/dist/css/bootstrap.min.css'); ?>">
    <link rel="stylesheet" href="<?php asset('core/swiper/dist/css/swiper.min.css'); ?>">
    <link rel="stylesheet" href="<?php asset('statics/css/newindex.css'); ?>">

    <?php
    $thumb = get_post_meta($post->ID,'_thumbnail_id',false);
    $thumb = wp_get_attachment_image_src($thumb[0], false);
    $thumb = $thumb[0];
    $default_img = get_bloginfo('stylesheet_directory').'/img/fb2.png';
    ?>
	<?php  if(is_page( 'index' ) ) { ?>
        <meta property="og:type" content="article" />
        <meta property="og:title" content="<?php bloginfo('name');?>" />
        <meta property="og:description" content="<?php bloginfo('description'); ?>" />
        <meta property="og:url" content="<?php the_permalink(); ?>"/>
        <meta property="og:image" content="<?php bloginfo('template_directory'); ?>/img/fb.png" />
    <?php  } elseif(is_404()) { ?>
        <meta property="og:type" content="article" />
        <meta property="og:title" content="<?php bloginfo(''); ?> | 404" />
        <meta property="og:url" content="<?php bloginfo('url'); ?>"/>
        <meta property="og:description" content="<?php bloginfo('description'); ?>" />
        <meta property="og:image" content="<?php bloginfo('template_directory'); ?>/img/fb.png" />
	<?php } elseif(is_single() || is_page()) { ?>
        <meta property="og:type" content="article" />
        <meta property="og:title" content="<?php bloginfo('name');?> | <?php the_title(); ?>" />
        <meta property="og:description" content="<?php the_excerpt();?>" />
        <meta property="og:url" content="<?php the_permalink(); ?>"/>
        <meta property="og:image" content="<?php if ( $thumb[0] == null ) { echo $default_img; } else { echo $thumb; } ?>" />
        
    <?php  } elseif(is_home) { ?>
        <meta property="og:type" content="article" />
        <meta property="og:title" content="<?php bloginfo(''); ?>" />
        <meta property="og:url" content="<?php bloginfo('url'); ?>"/>
        <meta property="og:description" content="<?php bloginfo('description'); ?>" />
        <meta property="og:image" content="<?php bloginfo('template_directory'); ?>/img/fb.png" />
        
    <?php  } else { ?>
        <meta property="og:type" content="article" />
        <meta property="og:title" content="<?php bloginfo('name'); ?>" />
        <meta property="og:url" content="<?php bloginfo('url'); ?>"/>
        <meta property="og:description" content="<?php bloginfo('description'); ?>" />
        <meta property="og:image" content="<?php bloginfo('template_directory'); ?>/img/fb.png" />
                
    <?php  } wp_head(); ?>
</head>

<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse"
                    data-target="#example-navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?php bloginfo( 'home' ); ?>">
                <h3>CHERUBIC</h3>
                <h3>VENTURES</h3>
            </a>
        </div>
        <div class="collapse navbar-collapse" id="example-navbar-collapse">
            <?php wp_nav_menu(array('container' => false, 'menu_class'=>'nav navbar-nav', 'menu_id'=>false, 'items_wrap'=>'<ul class="%2$s">%3$s</ul>',  'theme_location' => 'primary')); ?>
        </div>
        <div class="language">
            <span class='language-text'></span>
            <div class='langbox'>
                <?php if(is_404()) $url = get_option('home'); else $url = ''; global $q_config; ?>
                <?php foreach(qtranxf_getSortedLanguages() as $language) { ?>
                <a id="<?php echo $language; ?>" href="<?php echo qtranxf_convertURL($url, $language, false, true); ?>"><span><?php echo $q_config['language_name'][$language]; ?></span></a>
                <?php } ?>
            </div>
        </div>
    </div>
</nav>